package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;


@Embeddable
public class ChannelEbookPK  implements Serializable{
	@Basic(optional = false)
	@Column(name = "contentid")
	private Integer contentid;  
	@Basic(optional = false)
	@Column(name = "channel")
	private Integer channel;                   
	
	public ChannelEbookPK(){
	}
    public ChannelEbookPK(Integer contentid,Integer channel){
		this.contentid=contentid;
		this.channel=channel;
	}
    
    
	public Integer getContentid() {
		return contentid;
	}
	public void setContentid(Integer contentid) {
		this.contentid = contentid;
	}
	public Integer getChannel() {
		return channel;
	}
	public void setChannel(Integer channel) {
		this.channel = channel;
	}
	
	
	@Override
	public int hashCode() {
	        int hash = 0;
	        hash += (contentid != null ? contentid.hashCode() : 0);
	        hash += (channel != null ? channel.hashCode() : 0);
	        return hash;
	}

    @Override
	public boolean equals(Object object) {
	    if (!(object instanceof ChannelEbookPK)) {
	          return false;
	     }
	    ChannelEbookPK other = (ChannelEbookPK) object;
	     if ((this.contentid == null && other.contentid != null) || (this.contentid != null && !this.contentid.equals(other.contentid))) {
	         return false;
	     }
	     if ((this.channel == null && other.channel != null) || (this.channel != null && !this.channel.equals(other.channel))) {
	         return false;
	     }
	     return true;
	}
	    
	@Override
    public String toString() {
        return "com.dp.vo.ChannelEbookPK[contentid=" + contentid + ",channel="+channel+"]";
    }
	
	
}
